In [1]:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt

from warnings import filterwarnings
filterwarnings('ignore')
In C:\Users\Administrator\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle: 
The text.latex.preview rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Users\Administrator\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle: 
The mathtext.fallback_to_cm rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Users\Administrator\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle: Support for setting the 'mathtext.fallback_to_cm' rcParam is deprecated since 3.3 and will be removed two minor releases later; use 'mathtext.fallback : 'cm' instead.
In C:\Users\Administrator\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle: 
The validate_bool_maybe_none function was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Users\Administrator\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle: 
The savefig.jpeg_quality rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Users\Administrator\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle: 
The keymap.all_axes rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Users\Administrator\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle: 
The animation.avconv_path rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Users\Administrator\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle: 
The animation.avconv_args rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.

Reading dataset

In [3]:
df= pd.read_csv(r'C:\Users\Administrator\Documents\Data Analytics Real World Project -Python\3-Zomato Data Analysis/zomato.csv')
In [4]:
df.head()
Out[4]:
url address name online_order book_table rate votes phone location rest_type dish_liked cuisines approx_cost(for two people) reviews_list menu_item listed_in(type) listed_in(city)
0 https://www.zomato.com/bangalore/jalsa-banasha... 942, 21st Main Road, 2nd Stage, Banashankari, ... Jalsa Yes Yes 4.1/5 775 080 42297555\r\n+91 9743772233 Banashankari Casual Dining Pasta, Lunch Buffet, Masala Papad, Paneer Laja... North Indian, Mughlai, Chinese 800 [('Rated 4.0', 'RATED\n A beautiful place to ... [] Buffet Banashankari
1 https://www.zomato.com/bangalore/spice-elephan... 2nd Floor, 80 Feet Road, Near Big Bazaar, 6th ... Spice Elephant Yes No 4.1/5 787 080 41714161 Banashankari Casual Dining Momos, Lunch Buffet, Chocolate Nirvana, Thai G... Chinese, North Indian, Thai 800 [('Rated 4.0', 'RATED\n Had been here for din... [] Buffet Banashankari
2 https://www.zomato.com/SanchurroBangalore?cont... 1112, Next to KIMS Medical College, 17th Cross... San Churro Cafe Yes No 3.8/5 918 +91 9663487993 Banashankari Cafe, Casual Dining Churros, Cannelloni, Minestrone Soup, Hot Choc... Cafe, Mexican, Italian 800 [('Rated 3.0', "RATED\n Ambience is not that ... [] Buffet Banashankari
3 https://www.zomato.com/bangalore/addhuri-udupi... 1st Floor, Annakuteera, 3rd Stage, Banashankar... Addhuri Udupi Bhojana No No 3.7/5 88 +91 9620009302 Banashankari Quick Bites Masala Dosa South Indian, North Indian 300 [('Rated 4.0', "RATED\n Great food and proper... [] Buffet Banashankari
4 https://www.zomato.com/bangalore/grand-village... 10, 3rd Floor, Lakshmi Associates, Gandhi Baza... Grand Village No No 3.8/5 166 +91 8026612447\r\n+91 9901210005 Basavanagudi Casual Dining Panipuri, Gol Gappe North Indian, Rajasthani 600 [('Rated 4.0', 'RATED\n Very good restaurant ... [] Buffet Banashankari

Exploratory data analysis

In [5]:
df.shape
Out[5]:
(51717, 17)
In [6]:
df.dtypes
Out[6]:
url                            object
address                        object
name                           object
online_order                   object
book_table                     object
rate                           object
votes                           int64
phone                          object
location                       object
rest_type                      object
dish_liked                     object
cuisines                       object
approx_cost(for two people)    object
reviews_list                   object
menu_item                      object
listed_in(type)                object
listed_in(city)                object
dtype: object
In [7]:
len(df['name'].unique())
Out[7]:
8792

There are 8792 unique restaurants

In [10]:
#checking null values

df.isna().sum()
Out[10]:
url                                0
address                            0
name                               0
online_order                       0
book_table                         0
rate                            7775
votes                              0
phone                           1208
location                          21
rest_type                        227
dish_liked                     28078
cuisines                          45
approx_cost(for two people)      346
reviews_list                       0
menu_item                          0
listed_in(type)                    0
listed_in(city)                    0
dtype: int64

Getting features with NAN values

In [12]:
features_na=[feature for feature in df.columns if df[feature].isna().sum() > 0]
features_na
Out[12]:
['rate',
 'phone',
 'location',
 'rest_type',
 'dish_liked',
 'cuisines',
 'approx_cost(for two people)']

Checking the % of missing values

In [13]:
for feature in features_na:
    print(' {} has {}% missing values '.format(feature,np.round(df[feature].isna().sum()/len(df)*100,4)))
 rate has 15.0337% missing values 
 phone has 2.3358% missing values 
 location has 0.0406% missing values 
 rest_type has 0.4389% missing values 
 dish_liked has 54.2916% missing values 
 cuisines has 0.087% missing values 
 approx_cost(for two people) has 0.669% missing values 
In [15]:
df['rate'].unique()
Out[15]:
array(['4.1/5', '3.8/5', '3.7/5', '3.6/5', '4.6/5', '4.0/5', '4.2/5',
       '3.9/5', '3.1/5', '3.0/5', '3.2/5', '3.3/5', '2.8/5', '4.4/5',
       '4.3/5', 'NEW', '2.9/5', '3.5/5', nan, '2.6/5', '3.8 /5', '3.4/5',
       '4.5/5', '2.5/5', '2.7/5', '4.7/5', '2.4/5', '2.2/5', '2.3/5',
       '3.4 /5', '-', '3.6 /5', '4.8/5', '3.9 /5', '4.2 /5', '4.0 /5',
       '4.1 /5', '3.7 /5', '3.1 /5', '2.9 /5', '3.3 /5', '2.8 /5',
       '3.5 /5', '2.7 /5', '2.5 /5', '3.2 /5', '2.6 /5', '4.5 /5',
       '4.3 /5', '4.4 /5', '4.9/5', '2.1/5', '2.0/5', '1.8/5', '4.6 /5',
       '4.9 /5', '3.0 /5', '4.8 /5', '2.3 /5', '4.7 /5', '2.4 /5',
       '2.1 /5', '2.2 /5', '2.0 /5', '1.8 /5'], dtype=object)

Dropping the NAN values

In [16]:
df.dropna(axis='index',inplace=True,subset=['rate'])
df['rate'].unique()
Out[16]:
array(['4.1/5', '3.8/5', '3.7/5', '3.6/5', '4.6/5', '4.0/5', '4.2/5',
       '3.9/5', '3.1/5', '3.0/5', '3.2/5', '3.3/5', '2.8/5', '4.4/5',
       '4.3/5', 'NEW', '2.9/5', '3.5/5', '2.6/5', '3.8 /5', '3.4/5',
       '4.5/5', '2.5/5', '2.7/5', '4.7/5', '2.4/5', '2.2/5', '2.3/5',
       '3.4 /5', '-', '3.6 /5', '4.8/5', '3.9 /5', '4.2 /5', '4.0 /5',
       '4.1 /5', '3.7 /5', '3.1 /5', '2.9 /5', '3.3 /5', '2.8 /5',
       '3.5 /5', '2.7 /5', '2.5 /5', '3.2 /5', '2.6 /5', '4.5 /5',
       '4.3 /5', '4.4 /5', '4.9/5', '2.1/5', '2.0/5', '1.8/5', '4.6 /5',
       '4.9 /5', '3.0 /5', '4.8 /5', '2.3 /5', '4.7 /5', '2.4 /5',
       '2.1 /5', '2.2 /5', '2.0 /5', '1.8 /5'], dtype=object)
In [18]:
df.shape
Out[18]:
(43942, 17)

Removing evrything after / from rate

In [19]:
def split(x):
    return x.split('/')[0]
In [20]:
df['rate']=df['rate'].apply(split)
df['rate'].unique()
Out[20]:
array(['4.1', '3.8', '3.7', '3.6', '4.6', '4.0', '4.2', '3.9', '3.1',
       '3.0', '3.2', '3.3', '2.8', '4.4', '4.3', 'NEW', '2.9', '3.5',
       '2.6', '3.8 ', '3.4', '4.5', '2.5', '2.7', '4.7', '2.4', '2.2',
       '2.3', '3.4 ', '-', '3.6 ', '4.8', '3.9 ', '4.2 ', '4.0 ', '4.1 ',
       '3.7 ', '3.1 ', '2.9 ', '3.3 ', '2.8 ', '3.5 ', '2.7 ', '2.5 ',
       '3.2 ', '2.6 ', '4.5 ', '4.3 ', '4.4 ', '4.9', '2.1', '2.0', '1.8',
       '4.6 ', '4.9 ', '3.0 ', '4.8 ', '2.3 ', '4.7 ', '2.4 ', '2.1 ',
       '2.2 ', '2.0 ', '1.8 '], dtype=object)

Replacing NEW and - with 0

In [21]:
df.replace('NEW',0,inplace=True)
In [22]:
df.replace('-',0,inplace=True)
In [23]:
df['rate'].unique()
Out[23]:
array(['4.1', '3.8', '3.7', '3.6', '4.6', '4.0', '4.2', '3.9', '3.1',
       '3.0', '3.2', '3.3', '2.8', '4.4', '4.3', 0, '2.9', '3.5', '2.6',
       '3.8 ', '3.4', '4.5', '2.5', '2.7', '4.7', '2.4', '2.2', '2.3',
       '3.4 ', '3.6 ', '4.8', '3.9 ', '4.2 ', '4.0 ', '4.1 ', '3.7 ',
       '3.1 ', '2.9 ', '3.3 ', '2.8 ', '3.5 ', '2.7 ', '2.5 ', '3.2 ',
       '2.6 ', '4.5 ', '4.3 ', '4.4 ', '4.9', '2.1', '2.0', '1.8', '4.6 ',
       '4.9 ', '3.0 ', '4.8 ', '2.3 ', '4.7 ', '2.4 ', '2.1 ', '2.2 ',
       '2.0 ', '1.8 '], dtype=object)

changing the datatype of rate to float

In [24]:
df['rate']=df['rate'].astype(float)
In [25]:
df['rate'].dtype
Out[25]:
dtype('float64')

Calculating Avg rating of each restaurant

In [28]:
df.groupby('name')['rate'].mean().nlargest(20).plot.bar()
Out[28]:
<AxesSubplot:xlabel='name'>
In [35]:
df_rate=df.groupby('name')['rate'].mean().to_frame()
df_rate=df_rate.reset_index()
df_rate.columns=['Restaurant','Rating']
In [36]:
df_rate.head(20)
Out[36]:
Restaurant Rating
0 #FeelTheROLL 3.400000
1 #L-81 Cafe 3.900000
2 #refuel 3.700000
3 1000 B.C 3.200000
4 100°C 3.700000
5 11 to 11 Express Biriyanis 3.500000
6 1131 Bar + Kitchen 4.500000
7 12th Main - Grand Mercure 4.100000
8 1441 Pizzeria 4.100000
9 1522 - The Pub 4.212000
10 154 Breakfast Club 4.000000
11 1722 Urban Bistro 4.100000
12 18+ Ice Cafe 3.500000
13 1947 4.021429
14 1980s Games Cafe 3.400000
15 1992 Chats - Space 3.700000
16 1Q1 4.300000
17 1TO3 Kitchen 3.100000
18 2 Statez 3.700000
19 20 Char - Sterlings MAC Hotel 4.000000
In [38]:
df_rate.shape
Out[38]:
(7162, 2)
In [39]:
sns.set_style(style='whitegrid')
sns.distplot(df_rate['Rating'])
Out[39]:
<AxesSubplot:xlabel='Rating', ylabel='Density'>

50 % of the restaurants have rating between 3-4, While restaurants with rating above 4.5 are very rare.

In [ ]:
 

Finding the top restaurants in Bangaluru

In [41]:
plt.figure(figsize=(10,7))
chains=df['name'].value_counts()[0:20]
sns.barplot(x=chains,y=chains.index,palette='deep')
plt.title("Most famous restaurants chains in Bangaluru")
plt.xlabel("Number of outlets") 
Out[41]:
Text(0.5, 0, 'Number of outlets')
In [49]:
fig1=px.bar(x=chains,y=chains.index)
fig1.show()

Checking how many Restaurants accept online orders

In [42]:
x= df['online_order'].value_counts()
labels=['Accepted','Not Accepted']
plt.pie(x,explode=[0.0,0.1],autopct='%1.1f%%')
Out[42]:
([<matplotlib.patches.Wedge at 0x298e5938648>,
  <matplotlib.patches.Wedge at 0x298e8ec0bc8>],
 [Text(-0.481488774517003, 0.9890240442042423, ''),
  Text(0.5252605823084886, -1.0789352717716423, '')],
 [Text(-0.26263024064563795, 0.5394676604750411, '64.4%'),
  Text(0.30640200634661835, -0.629378908533458, '35.6%')])

Plotting using plotly

In [43]:
import plotly.express as px
In [44]:
x= df['online_order'].value_counts()
labels=['Accepted','Not Accepted']
fig=px.pie(df,values=x,names=labels,title='Pie Chart for Online Order Acceptance')
In [45]:
fig.show()

Checking the ratio between the restaurants proving Table Booking

In [50]:
x= df['book_table'].value_counts()
labels=['Allowed','Not Allowed']
fig=px.pie(df,values=x,names=labels,title='Pie Chart for Online Booking tables')
fig.show()

Using Graph_obj in plotly

In [51]:
import plotly.graph_objs as go
from plotly.offline import iplot
In [52]:
x= df['book_table'].value_counts()
labels=['Allowed','Not Allowed']
In [59]:
trace=go.Pie(labels=labels,values=x,
    hoverinfo='label+value',textinfo='percent',
    textfont=dict(size=25),
    pull=[0, 0, 0,0.2, 0]
)
In [60]:
iplot([trace])

Analyzing different types of restaurants

In [61]:
df['rest_type'].isna().sum()
Out[61]:
151
In [64]:
df['rest_type'].dropna(inplace=True)
In [65]:
df['rest_type'].isna().sum()
Out[65]:
151
In [67]:
df['rest_type'].describe()
Out[67]:
count           43791
unique             87
top       Quick Bites
freq            15073
Name: rest_type, dtype: object
In [70]:
plt.figure(figsize=(20,12))
df['rest_type'].value_counts().nlargest(20).plot.bar(color='red')
plt.gcf().autofmt_xdate()

Ploting using plotly

In [78]:
trace1= go.Bar(
    x=df['rest_type'].value_counts().nlargest(20).index,
    y=df['rest_type'].value_counts().nlargest(20),
    name='rest_type')
In [79]:
iplot([trace1])

Noticing from the graph Quick bite restaurants are most famous in bangalore as it is the tech capital of India

Finding the highest voted restaurant

In [81]:
df.groupby('name')['votes'].max().nlargest(20).plot.bar(color='red')
Out[81]:
<AxesSubplot:xlabel='name'>

Now using plotly

In [82]:
trace2=go.Bar(
    x=df.groupby('name')['votes'].max().nlargest(20).index,
    y=df.groupby('name')['votes'].max().nlargest(20),
    name='name'
)
In [83]:
iplot([trace2])

From the above bar graph: Big brewski brewing company is the highest voted rest in bangalore

In [ ]:
 

Total rest at different locations

In [84]:
df.groupby('location')['name'].unique()
Out[84]:
location
BTM                  [Sankranthi Veg Restaurant, Hearts Unlock Cafe...
Banashankari         [Jalsa, Spice Elephant, San Churro Cafe, Addhu...
Banaswadi            [Cafe Nibras, The Sanctuary, Crunch Pizzas, Pi...
Bannerghatta Road    [Deja Vu Resto Bar, Fattoush, Empire Restauran...
Basavanagudi         [Grand Village, Timepass Dinner, Srinathji's C...
                                           ...                        
West Bangalore       [FreshMenu, Fit Dish Fetish, Garden City Mobil...
Whitefield           [Imperio Cafe, Night Diaries, LocalHost, AB's ...
Wilson Garden        [Tree Top, Sahana's (Nati Style), Karavali Kol...
Yelahanka            [Prashanth Naati Corner, Cheta's Kitchen, Twis...
Yeshwantpur          [Chef's Bank, New Agarwal Bhavan, Fishing Boat...
Name: name, Length: 92, dtype: object
In [85]:
restaurant=[]
location=[]
for key,location_df in df.groupby('location'):
    location.append(key)
    restaurant.append(len(location_df['name'].unique()))
In [86]:
df_total=pd.DataFrame(zip(location,restaurant))
df_total.columns=['location','restaurant']
df_total.set_index('location',inplace=True)
df_total.sort_values(by='restaurant').tail(10)
Out[86]:
restaurant
location
Bellandur 284
Jayanagar 311
Bannerghatta Road 362
JP Nagar 400
Indiranagar 467
Electronic City 518
Marathahalli 525
HSR 553
BTM 581
Whitefield 634
In [87]:
df_total.sort_values(by='restaurant').tail(10).plot.bar(color='purple')
Out[87]:
<AxesSubplot:xlabel='location'>
In [95]:
trace3=go.Bar(
    x=df_total['restaurant'].nlargest(10).index,
    y=df_total['restaurant'].nlargest(10),
    name='restaurant'
)
In [96]:
iplot([trace3])
In [97]:
df.isnull().sum()
Out[97]:
url                                0
address                            0
name                               0
online_order                       0
book_table                         0
rate                               0
votes                              0
phone                            832
location                           0
rest_type                        151
dish_liked                     20333
cuisines                          11
approx_cost(for two people)      252
reviews_list                       0
menu_item                          0
listed_in(type)                    0
listed_in(city)                    0
dtype: int64
In [98]:
#Representing different type of restaurant data in Percentage 
In [101]:
((df['rest_type'].value_counts()/len(df))*100).nlargest(10).plot.bar(color='red')
Out[101]:
<AxesSubplot:>

Analyzing data on the basis of cuisines

In [104]:
cuisines=df['cuisines'].value_counts()[:10]
trace4=go.Bar(x=cuisines.index,
             y=cuisines,
             name='cuisines')
In [105]:
iplot([trace4])

From the above data it's clear that North Indian food rocks!! even in Bangaluru

In [ ]:
 

Finidng out cost for 2 people at different rest.

In [ ]:
 
In [106]:
len(df['approx_cost(for two people)'].value_counts())
Out[106]:
66
In [107]:
df['approx_cost(for two people)'].isna().sum()
Out[107]:
252
In [108]:
df.dropna(axis='index',subset=['approx_cost(for two people)'],inplace=True)
In [109]:
df['approx_cost(for two people)'].isna().sum()
Out[109]:
0
In [110]:
df['approx_cost(for two people)'].unique()
Out[110]:
array(['800', '300', '600', '700', '550', '500', '450', '650', '400',
       '900', '200', '750', '150', '850', '100', '1,200', '350', '250',
       '950', '1,000', '1,500', '1,300', '199', '80', '1,100', '160',
       '1,600', '230', '130', '1,700', '1,400', '1,350', '2,200', '2,000',
       '1,800', '1,900', '180', '330', '2,500', '2,100', '3,000', '2,800',
       '3,400', '50', '40', '1,250', '3,500', '4,000', '2,400', '2,600',
       '1,450', '70', '3,200', '560', '240', '360', '6,000', '1,050',
       '2,300', '4,100', '120', '5,000', '3,700', '1,650', '2,700',
       '4,500'], dtype=object)
In [112]:
df['approx_cost(for two people)'].dtype
Out[112]:
dtype('O')
In [113]:
df['approx_cost(for two people)']=df['approx_cost(for two people)'].apply(lambda x: x.replace(',',''))
In [114]:
df['approx_cost(for two people)'].unique()
Out[114]:
array(['800', '300', '600', '700', '550', '500', '450', '650', '400',
       '900', '200', '750', '150', '850', '100', '1200', '350', '250',
       '950', '1000', '1500', '1300', '199', '80', '1100', '160', '1600',
       '230', '130', '1700', '1400', '1350', '2200', '2000', '1800',
       '1900', '180', '330', '2500', '2100', '3000', '2800', '3400', '50',
       '40', '1250', '3500', '4000', '2400', '2600', '1450', '70', '3200',
       '560', '240', '360', '6000', '1050', '2300', '4100', '120', '5000',
       '3700', '1650', '2700', '4500'], dtype=object)
In [115]:
df['approx_cost(for two people)']=df['approx_cost(for two people)'].astype(int)
In [116]:
df['approx_cost(for two people)'].dtype
Out[116]:
dtype('int32')
In [117]:
sns.distplot(df['approx_cost(for two people)'])
Out[117]:
<AxesSubplot:xlabel='approx_cost(for two people)', ylabel='Density'>
In [118]:
# above graph shows that most of the restaurant's approx cost for 2 is nearly 1000
In [ ]:
 

Analyzing Cost vs Rating of restaurants

In [121]:
plt.figure(figsize=(12,8))
sns.scatterplot(x="rate",y='approx_cost(for two people)',hue='online_order',data=df)
plt.show()

Analyzing above graphs , we notice that most of the restaurants accepting online orders are higly rated and affordable
While most restaurants that doesn't accpet online orders are Higly rated but Expensive

In [ ]:
 

Finding difference between votes for restaurants accepting or not accepting online orders

In [127]:
sns.boxplot(x='online_order',y='votes',data=df)
Out[127]:
<AxesSubplot:xlabel='online_order', ylabel='votes'>
In [130]:
fig = px.box(df,x='online_order',y='votes')
fig.show()

from this boxplot,we can observe that median number of votes for both categories vary. Restaurants accepting online orders get more votes from customers as there is a rating option poping up after each order through zomato application.

In [ ]:
 

Price vs Online ordering

In [128]:
sns.boxplot(x='online_order',y='approx_cost(for two people)',data=df)
Out[128]:
<AxesSubplot:xlabel='online_order', ylabel='approx_cost(for two people)'>
In [129]:
fig = px.box(df,x='online_order',y='approx_cost(for two people)')
fig.show()

Restaurants with online orders are more affordable than the ones with no online ordering

In [ ]:
 

Cheapest cost restaurants for 2 people

In [133]:
df['approx_cost(for two people)'].min()
Out[133]:
40
In [137]:
df[df['approx_cost(for two people)']==40]
Out[137]:
url address name online_order book_table rate votes phone location rest_type dish_liked cuisines approx_cost(for two people) reviews_list menu_item listed_in(type) listed_in(city)
5270 https://www.zomato.com/bangalore/srinidhi-saga... 68, Appareddy Palya, Near ESI Hospital, HAL 2n... Srinidhi Sagar Food Line Yes No 3.7 129 080 25250408 Indiranagar Quick Bites Vada, Masala Dosa, Filter Coffee South Indian, North Indian, Chinese 40 [('Rated 4.0', "RATED\n Love their masala dos... ['2 Idly and 1 Vada', 'Rice Bath', 'Poori', 'M... Delivery Brigade Road
12232 https://www.zomato.com/bangalore/srinidhi-saga... 68, Appareddy Palya, Near ESI Hospital, HAL 2n... Srinidhi Sagar Food Line Yes No 3.7 129 080 25250408 Indiranagar Quick Bites Vada, Masala Dosa, Filter Coffee South Indian, North Indian, Chinese 40 [('Rated 4.0', "RATED\n Love their masala dos... ['2 Idly and 1 Vada', 'Rice Bath', 'Poori', 'M... Delivery Church Street
14819 https://www.zomato.com/bangalore/srinidhi-saga... 68, Appareddy Palya, Near ESI Hospital, HAL 2n... Srinidhi Sagar Food Line Yes No 3.7 131 080 25250408 Indiranagar Quick Bites Vada, Masala Dosa, Filter Coffee South Indian, North Indian, Chinese 40 [('Rated 4.0', 'RATED\n Affordable price. If ... ['2 Idly and 1 Vada', 'Rice Bath', 'Poori', 'M... Delivery Frazer Town
17773 https://www.zomato.com/bangalore/srinidhi-saga... 4, 19th Main Road, 6th Cross, Kodihalli, Old A... Srinidhi Sagar Yes No 3.9 160 080 25219337 Old Airport Road Quick Bites Masala Dosa, Rava Dosa, Rava Idli, Filter Coff... South Indian, North Indian, Chinese 40 [('Rated 4.0', 'RATED\n Ordered vada sambhar ... [] Delivery Indiranagar
18891 https://www.zomato.com/bangalore/srinidhi-saga... 68, Appareddy Palya, Near ESI Hospital, HAL 2n... Srinidhi Sagar Food Line Yes No 3.7 129 080 25250408 Indiranagar Quick Bites Vada, Masala Dosa, Filter Coffee South Indian, North Indian, Chinese 40 [('Rated 4.0', "RATED\n Love their masala dos... [] Dine-out Indiranagar
27091 https://www.zomato.com/bangalore/srinidhi-saga... 412, Seventh Cross, Domlur, Bangalore Srinidhi Sagar Deluxe Yes No 3.6 108 080 25354689 Domlur Quick Bites Idli, Coffee, Masala Dosa, Fruit Juices, Vada,... South Indian, North Indian, Chinese 40 [('Rated 4.0', 'RATED\n whenever I get up lat... [] Delivery Koramangala 4th Block
29785 https://www.zomato.com/bangalore/srinidhi-saga... 412, Seventh Cross, Domlur, Bangalore Srinidhi Sagar Deluxe Yes No 3.6 108 080 25354689 Domlur Quick Bites Idli, Coffee, Masala Dosa, Fruit Juices, Vada,... South Indian, North Indian, Chinese 40 [('Rated 4.0', 'RATED\n whenever I get up lat... ['Paneer Butter Masala', 'Curd Rice', 'Veg Pul... Delivery Koramangala 5th Block
32485 https://www.zomato.com/bangalore/srinidhi-saga... 4, 19th Main Road, 6th Cross, Kodihalli, Old A... Srinidhi Sagar Yes No 3.9 162 080 25219337 Old Airport Road Quick Bites Masala Dosa, Rava Dosa, Rava Idli, Filter Coff... South Indian, North Indian, Chinese 40 [('Rated 4.0', 'RATED\n Ordered vada sambhar ... [] Delivery Koramangala 6th Block

most expensive cost for 2 people

In [135]:
df['approx_cost(for two people)'].max()
Out[135]:
6000
In [136]:
df[df['approx_cost(for two people)']==6000]
Out[136]:
url address name online_order book_table rate votes phone location rest_type dish_liked cuisines approx_cost(for two people) reviews_list menu_item listed_in(type) listed_in(city)
19139 https://www.zomato.com/bangalore/le-cirque-sig... The Leela Palace, 23, Old Airport Road, Bangalore Le Cirque Signature - The Leela Palace No Yes 4.3 126 080 30571234\r\n080 30571540 Old Airport Road Fine Dining Wine, Asparagus Soup, Creme Brulee, Pasta, Rav... French, Italian 6000 [('Rated 5.0', 'RATED\n Awesome would be an u... [] Dine-out Indiranagar
45618 https://www.zomato.com/bangalore/le-cirque-sig... The Leela Palace, 23, Old Airport Road, Bangalore Le Cirque Signature - The Leela Palace No Yes 4.3 128 080 30571234\n080 30571540 Old Airport Road Fine Dining Wine, Asparagus Soup, Creme Brulee, Pasta, Rav... French, Italian 6000 [('Rated 5.0', 'RATED\n Awesome would be an u... [] Dine-out Old Airport Road

HistPlot for cost for 2 people

In [140]:
plt.figure(figsize=(15,9))
sns.histplot(df,x='approx_cost(for two people)')
plt.show()
In [141]:
px.histogram(df, x="approx_cost(for two people)")

Mostly cost of all restaurants is below Rs.1000 but some are expensive

In [ ]:
 

Most costly Rate for 2 people is served at which Restaurant what exactly is the dish involved in this and liked dish of that restaurant

In [142]:
df[df['approx_cost(for two people)']==6000].loc[:,('name','cuisines','dish_liked')]
Out[142]:
name cuisines dish_liked
19139 Le Cirque Signature - The Leela Palace French, Italian Wine, Asparagus Soup, Creme Brulee, Pasta, Rav...
45618 Le Cirque Signature - The Leela Palace French, Italian Wine, Asparagus Soup, Creme Brulee, Pasta, Rav...
In [143]:
df[df['approx_cost(for two people)']==6000][['name','cuisines','dish_liked']]
Out[143]:
name cuisines dish_liked
19139 Le Cirque Signature - The Leela Palace French, Italian Wine, Asparagus Soup, Creme Brulee, Pasta, Rav...
45618 Le Cirque Signature - The Leela Palace French, Italian Wine, Asparagus Soup, Creme Brulee, Pasta, Rav...
In [144]:
data=df.copy()
In [145]:
data.dtypes
Out[145]:
url                             object
address                         object
name                            object
online_order                    object
book_table                      object
rate                           float64
votes                            int64
phone                           object
location                        object
rest_type                       object
dish_liked                      object
cuisines                        object
approx_cost(for two people)      int32
reviews_list                    object
menu_item                       object
listed_in(type)                 object
listed_in(city)                 object
dtype: object
In [147]:
data.set_index('name',inplace=True)
In [148]:
### Top 10 Most Expensive restaurant with approx cost for 2 people
In [149]:
data['approx_cost(for two people)'].nlargest(10).plot.bar()
Out[149]:
<AxesSubplot:xlabel='name'>
In [150]:
trace1=go.Bar(
    x=data['approx_cost(for two people)'].nlargest(10).index,
    y=data['approx_cost(for two people)'].nlargest(10),
    name='Priority'
)
In [151]:
iplot([trace1])

Top 10 Cheapest restaurant with approx cost for 2 people

In [152]:
data['approx_cost(for two people)'].nsmallest(10).plot.bar()
Out[152]:
<AxesSubplot:xlabel='name'>
In [153]:
trace1=go.Bar(
    x=data['approx_cost(for two people)'].nsmallest(10).index,
    y=data['approx_cost(for two people)'].nsmallest(10),
    name='Priority'
)
In [154]:
iplot([trace1])

Cheapest restaurants location wise

In [164]:
#data.set_index('location',inplace=True)
data['approx_cost(for two people)'].nsmallest(20).plot.bar()
Out[164]:
<AxesSubplot:xlabel='location'>
In [166]:
data['approx_cost(for two people)'].nlargest(20).plot.bar()
Out[166]:
<AxesSubplot:xlabel='location'>
In [ ]:
 

Finding Restaurants having rating above 4 and affordable

In [169]:
df[(df['rate']>=4) & (df['approx_cost(for two people)']<=500)].shape
Out[169]:
(4007, 17)
In [170]:
df_new=df[(df['rate']>=4) & (df['approx_cost(for two people)']<=500)]
In [171]:
len(df_new['name'].unique())
Out[171]:
628

Finding total such restaurants at different locations

In [172]:
location=[]
total=[]
for loc,location_df in df_new.groupby('location'):
    location.append(loc)
    total.append(len(location_df['name'].unique()))
In [173]:
len(location)
Out[173]:
68
In [174]:
len(total)
Out[174]:
68
In [180]:
location_df=pd.DataFrame(zip(location,total))
location_df.columns=['location','restaurants']
location_df.set_index('location',inplace=True)
In [182]:
location_df
Out[182]:
restaurants
location
BTM 54
Banashankari 25
Banaswadi 3
Bannerghatta Road 19
Basavanagudi 31
... ...
Varthur Main Road, Whitefield 4
Vasanth Nagar 4
Vijay Nagar 7
Whitefield 34
Yeshwantpur 4

68 rows × 1 columns

In [189]:
location_df['restaurants'].nlargest(10).plot.bar()
plt.gcf().autofmt_xdate()
plt.ylabel('Total restaurants')
Out[189]:
Text(0, 0.5, 'Total restaurants')
In [190]:
trace1 = go.Bar( 
        x = location_df['restaurants'].nlargest(10).index,
        y = location_df['restaurants'].nlargest(10),
        name= 'Priority')
iplot([trace1])

Finding best budget restaurant in any location

Creating a function which takes restaurant type and location and return names .

In [191]:
def return_budget(location,restaurant):
    budget=df[(df['approx_cost(for two people)']<=400) & (df['location']==location) & 
                     (df['rate']>4) & (df['rest_type']==restaurant)]
    return(budget['name'].unique())
In [192]:
return_budget('BTM',"Quick Bites")
Out[192]:
array(['Swadista Aahar', 'Litti Twist', 'The Shawarma Shop', 'Gorbandh',
       'Yum In My Tum', 'Chaatimes', "Muthashy's", 'Swad Punjab Da',
       "Domino's Pizza", 'Roti Wala', 'Andhra Kitchen'], dtype=object)
In [ ]:
 

Finding areas famous for restaurants

In [193]:
plt.figure(figsize=(10,7))
Restaurant_locations=df['location'].value_counts()[:20]
sns.barplot(Restaurant_locations,Restaurant_locations.index)
Out[193]:
<AxesSubplot:xlabel='location'>
In [194]:
Restaurant_locations=df['location'].value_counts()[:20]
trace1 = go.Bar( 
        x = Restaurant_locations.index,
        y = Restaurant_locations,
        name= 'Priority')
iplot([trace1])
In [ ]:
 

Performing Geographical Analysis

To do so we need longitudes and lattitudes of any location, hence we will use Geopy

In [195]:
df.shape
Out[195]:
(43690, 17)
In [196]:
len(df['location'].unique())
Out[196]:
92
In [197]:
locations=pd.DataFrame({"Name":df['location'].unique()})
In [200]:
locations['new_Name']='Bangalore '+locations['Name'] #Adding bangalore to the name 
In [201]:
locations.head()
Out[201]:
Name new_Name
0 Banashankari Bangalore Banashankari
1 Basavanagudi Bangalore Basavanagudi
2 Mysore Road Bangalore Mysore Road
3 Jayanagar Bangalore Jayanagar
4 Kumaraswamy Layout Bangalore Kumaraswamy Layout
In [202]:
!pip install geopy
Collecting geopy
  Downloading geopy-2.2.0-py3-none-any.whl (118 kB)
Collecting geographiclib<2,>=1.49
  Downloading geographiclib-1.52-py3-none-any.whl (38 kB)
Installing collected packages: geographiclib, geopy
Successfully installed geographiclib-1.52 geopy-2.2.0
In [203]:
from geopy.geocoders import Nominatim
In [204]:
lat_lon=[]
geolocator=Nominatim(user_agent="app")
for location in locations['Name']:
    location = geolocator.geocode(location)
    if location is None:
        lat_lon.append(np.nan)
    else:    
        geo=(location.latitude,location.longitude)
        lat_lon.append(geo)
In [205]:
locations['geo_loc']=lat_lon
In [206]:
locations.head()
Out[206]:
Name new_Name geo_loc
0 Banashankari Bangalore Banashankari (15.8876779, 75.7046777)
1 Basavanagudi Bangalore Basavanagudi (12.9417261, 77.5755021)
2 Mysore Road Bangalore Mysore Road (12.3872141, 76.6669626)
3 Jayanagar Bangalore Jayanagar (27.64392675, 83.05280519687284)
4 Kumaraswamy Layout Bangalore Kumaraswamy Layout (12.9081487, 77.5553179)
In [207]:
locations.to_csv('zomato_locations.csv',index=False)
In [ ]:
 

Now we can use these locations to plot maps

In [208]:
Rest_locations=pd.DataFrame(df['location'].value_counts().reset_index())
In [209]:
Rest_locations.columns=['Name','count']
Rest_locations.head()
Out[209]:
Name count
0 BTM 4237
1 Koramangala 5th Block 2358
2 HSR 2113
3 Indiranagar 1892
4 JP Nagar 1849
In [210]:
locations.head()
Out[210]:
Name new_Name geo_loc
0 Banashankari Bangalore Banashankari (15.8876779, 75.7046777)
1 Basavanagudi Bangalore Basavanagudi (12.9417261, 77.5755021)
2 Mysore Road Bangalore Mysore Road (12.3872141, 76.6669626)
3 Jayanagar Bangalore Jayanagar (27.64392675, 83.05280519687284)
4 Kumaraswamy Layout Bangalore Kumaraswamy Layout (12.9081487, 77.5553179)
In [211]:
locations.shape
Out[211]:
(92, 3)
In [212]:
Rest_locations.shape
Out[212]:
(92, 2)
In [213]:
Restaurant_locations=Rest_locations.merge(locations,on='Name',how="left").dropna()
Restaurant_locations.head()
Out[213]:
Name count new_Name geo_loc
0 BTM 4237 Bangalore BTM (45.95485055, -112.49659530324134)
1 Koramangala 5th Block 2358 Bangalore Koramangala 5th Block (12.9343774, 77.628415)
2 HSR 2113 Bangalore HSR (18.1475, 41.538889)
3 Indiranagar 1892 Bangalore Indiranagar (12.9732913, 77.6404672)
4 JP Nagar 1849 Bangalore JP Nagar (12.2655944, 76.6465404)
In [214]:
Restaurant_locations.shape
Out[214]:
(91, 4)
In [215]:
Restaurant_locations['count'].max()
Out[215]:
4237
In [216]:
type(Restaurant_locations['geo_loc'][0])
Out[216]:
tuple
In [217]:
def generateBaseMap(default_location=[12.97, 77.59], default_zoom_start=12):
    base_map = folium.Map(location=default_location, zoom_start=default_zoom_start)
    return base_map
In [218]:
len(Restaurant_locations['geo_loc'])
Out[218]:
91
In [219]:
Restaurant_locations.isna().sum()
Out[219]:
Name        0
count       0
new_Name    0
geo_loc     0
dtype: int64
In [220]:
Restaurant_locations['geo_loc'][0][0]
Out[220]:
45.95485055
In [221]:
Restaurant_locations['geo_loc'][0][1]
Out[221]:
-112.49659530324134
In [222]:
np.array(Restaurant_locations['geo_loc'])
Out[222]:
array([(45.95485055, -112.49659530324134), (12.9343774, 77.628415),
       (18.1475, 41.538889), (12.9732913, 77.6404672),
       (12.2655944, 76.6465404), (27.64392675, 83.05280519687284),
       (44.3730577, -71.6118577), (12.9552572, 77.6984163),
       (12.9059707, 77.6017374), (12.9400321, 77.6203272),
       (38.9385061, -84.572308), (12.9302645, 77.6332585),
       (12.93577245, 77.66676103753434), (12.933232, 77.6254669),
       (32.2934563, -64.78236307254568), (12.9252241, 77.6367015),
       (12.9778793, 77.6246697), (12.93433385, 77.63040639553275),
       (17.1452094, 79.6218777), (15.8876779, 75.7046777),
       (13.0221416, 77.6403368), (13.0027353, 77.5703253),
       (12.9417261, 77.5755021), (40.575894, -74.1251342),
       (-28.5477541, 29.788093), (33.5935063, -79.0345627),
       (12.996845, 77.6130165), (40.7133336, -74.0092085),
       (13.0093455, 77.6377094), (13.0170347, 77.5726006),
       (40.7652844, -76.373824), (13.0141618, 77.6518539),
       (12.9882338, 77.554883), (31.89376, -88.066644),
       (12.9624669, 77.6381958), (17.5223139, 78.5804307),
       (34.8457921, -82.338901), (51.5230784, -0.7374421),
       (51.519619, -0.0744749), (12.945245, 77.6269144),
       (18.5322493, 73.8499601124847), (12.9678074, 77.6568367),
       (12.988721250000001, 77.58516877601824), (12.9417812, 77.6160146),
       (12.9489339, 77.5968273), (12.9271867, 77.6266252),
       (12.9081487, 77.5553179), (13.2227, 78.5541977),
       (12.9089453, 77.6239038), (12.973936, 77.6509982),
       (12.9931876, 77.5753419), (12.9932236, 77.5391579),
       (-34.0048654, 22.4414125), (1.3089343, 103.8513177),
       (13.0258087, 77.6305067), (1.2847055, 103.84320655721689),
       (13.02383, 77.5529215), (13.0358698, 77.6323597),
       (12.9243509, 77.6255562), (13.0646907, 77.49626895712257),
       (12.9414662, 77.7470942), (12.9846713, 77.6790908),
       (12.9859966, 77.7327435), (39.76880625, -86.15345077251979),
       (12.7405867, 77.8200481), (22.8359967, 69.3405962),
       (17.2510682, 80.1651978), (13.0227204, 77.595715),
       (15.8782951, 74.5084834), (23.1485712, 81.6048241),
       (13.0621474, 77.58006135480495), (13.2923988, 77.7519261),
       (13.0215466, 77.7640586), (12.957998, 77.6037312),
       (38.7801076, -121.5056438), (12.945048, 77.263004),
       (13.6285774, 77.4642026), (13.0774728, 77.8010327),
       (12.5442176, 77.4213833), (12.3872141, 76.6669626),
       (13.0217151, 77.7660547), (13.007516, 77.695935),
       (13.0382184, 77.5919), (12.9055682, 77.5455438),
       (12.9176571, 77.4837568), (12.9900235, 77.572073),
       (12.8759384, 77.5960999), (13.1006982, 77.5963454),
       (12.9274413, 77.5155224), (13.0329419, 77.5273253),
       (12.9546741, 77.5121724)], dtype=object)
In [223]:
#### unzip it
lat,lon=zip(*np.array(Restaurant_locations['geo_loc']))
In [224]:
type(lat)
Out[224]:
tuple
In [225]:
Restaurant_locations['lat']=lat
Restaurant_locations['lon']=lon
In [226]:
Restaurant_locations.head()
Out[226]:
Name count new_Name geo_loc lat lon
0 BTM 4237 Bangalore BTM (45.95485055, -112.49659530324134) 45.954851 -112.496595
1 Koramangala 5th Block 2358 Bangalore Koramangala 5th Block (12.9343774, 77.628415) 12.934377 77.628415
2 HSR 2113 Bangalore HSR (18.1475, 41.538889) 18.147500 41.538889
3 Indiranagar 1892 Bangalore Indiranagar (12.9732913, 77.6404672) 12.973291 77.640467
4 JP Nagar 1849 Bangalore JP Nagar (12.2655944, 76.6465404) 12.265594 76.646540
In [227]:
!pip install folium
Collecting folium
  Downloading folium-0.12.1-py2.py3-none-any.whl (94 kB)
Requirement already satisfied: requests in c:\users\administrator\appdata\roaming\python\python37\site-packages (from folium) (2.25.1)
Collecting branca>=0.3.0
  Downloading branca-0.4.2-py3-none-any.whl (24 kB)
Requirement already satisfied: jinja2>=2.9 in c:\users\administrator\anaconda3\lib\site-packages (from folium) (2.11.1)
Requirement already satisfied: numpy in c:\users\administrator\anaconda3\lib\site-packages (from folium) (1.18.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\administrator\anaconda3\lib\site-packages (from requests->folium) (1.25.8)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\administrator\anaconda3\lib\site-packages (from requests->folium) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\administrator\anaconda3\lib\site-packages (from requests->folium) (2019.11.28)
Requirement already satisfied: idna<3,>=2.5 in c:\users\administrator\anaconda3\lib\site-packages (from requests->folium) (2.8)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\administrator\anaconda3\lib\site-packages (from jinja2>=2.9->folium) (1.1.1)
Installing collected packages: branca, folium
Successfully installed branca-0.4.2 folium-0.12.1
In [228]:
import folium
from folium.plugins import HeatMap
basemap=generateBaseMap()
In [229]:
basemap
Out[229]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [230]:
Restaurant_locations[['lat','lon','count']].values.tolist()
Out[230]:
[[45.95485055, -112.49659530324134, 4237.0],
 [12.9343774, 77.628415, 2358.0],
 [18.1475, 41.538889, 2113.0],
 [12.9732913, 77.6404672, 1892.0],
 [12.2655944, 76.6465404, 1849.0],
 [27.64392675, 83.05280519687284, 1711.0],
 [44.3730577, -71.6118577, 1688.0],
 [12.9552572, 77.6984163, 1488.0],
 [12.9059707, 77.6017374, 1318.0],
 [12.9400321, 77.6203272, 1103.0],
 [38.9385061, -84.572308, 1084.0],
 [12.9302645, 77.6332585, 1084.0],
 [12.93577245, 77.66676103753434, 1078.0],
 [12.933232, 77.6254669, 964.0],
 [32.2934563, -64.78236307254568, 963.0],
 [12.9252241, 77.6367015, 913.0],
 [12.9778793, 77.6246697, 901.0],
 [12.93433385, 77.63040639553275, 864.0],
 [17.1452094, 79.6218777, 818.0],
 [15.8876779, 75.7046777, 805.0],
 [13.0221416, 77.6403368, 745.0],
 [13.0027353, 77.5703253, 657.0],
 [12.9417261, 77.5755021, 628.0],
 [40.575894, -74.1251342, 626.0],
 [-28.5477541, 29.788093, 607.0],
 [33.5935063, -79.0345627, 579.0],
 [12.996845, 77.6130165, 574.0],
 [40.7133336, -74.0092085, 550.0],
 [13.0093455, 77.6377094, 522.0],
 [13.0170347, 77.5726006, 521.0],
 [40.7652844, -76.373824, 493.0],
 [13.0141618, 77.6518539, 491.0],
 [12.9882338, 77.554883, 487.0],
 [31.89376, -88.066644, 475.0],
 [12.9624669, 77.6381958, 426.0],
 [17.5223139, 78.5804307, 390.0],
 [34.8457921, -82.338901, 383.0],
 [51.5230784, -0.7374421, 343.0],
 [51.519619, -0.0744749, 309.0],
 [12.945245, 77.6269144, 292.0],
 [18.5322493, 73.8499601124847, 277.0],
 [12.9678074, 77.6568367, 262.0],
 [12.988721250000001, 77.58516877601824, 252.0],
 [12.9417812, 77.6160146, 227.0],
 [12.9489339, 77.5968273, 203.0],
 [12.9271867, 77.6266252, 193.0],
 [12.9081487, 77.5553179, 168.0],
 [13.2227, 78.5541977, 165.0],
 [12.9089453, 77.6239038, 157.0],
 [12.973936, 77.6509982, 152.0],
 [12.9931876, 77.5753419, 142.0],
 [12.9932236, 77.5391579, 141.0],
 [-34.0048654, 22.4414125, 140.0],
 [1.3089343, 103.8513177, 137.0],
 [13.0258087, 77.6305067, 129.0],
 [1.2847055, 103.84320655721689, 118.0],
 [13.02383, 77.5529215, 112.0],
 [13.0358698, 77.6323597, 111.0],
 [12.9243509, 77.6255562, 92.0],
 [13.0646907, 77.49626895712257, 91.0],
 [12.9414662, 77.7470942, 91.0],
 [12.9846713, 77.6790908, 91.0],
 [12.9859966, 77.7327435, 84.0],
 [39.76880625, -86.15345077251979, 77.0],
 [12.7405867, 77.8200481, 74.0],
 [22.8359967, 69.3405962, 69.0],
 [17.2510682, 80.1651978, 66.0],
 [13.0227204, 77.595715, 63.0],
 [15.8782951, 74.5084834, 58.0],
 [23.1485712, 81.6048241, 50.0],
 [13.0621474, 77.58006135480495, 47.0],
 [13.2923988, 77.7519261, 31.0],
 [13.0215466, 77.7640586, 30.0],
 [12.957998, 77.6037312, 27.0],
 [38.7801076, -121.5056438, 26.0],
 [12.945048, 77.263004, 24.0],
 [13.6285774, 77.4642026, 23.0],
 [13.0774728, 77.8010327, 22.0],
 [12.5442176, 77.4213833, 19.0],
 [12.3872141, 76.6669626, 18.0],
 [13.0217151, 77.7660547, 14.0],
 [13.007516, 77.695935, 11.0],
 [13.0382184, 77.5919, 10.0],
 [12.9055682, 77.5455438, 9.0],
 [12.9176571, 77.4837568, 9.0],
 [12.9900235, 77.572073, 8.0],
 [12.8759384, 77.5960999, 5.0],
 [13.1006982, 77.5963454, 4.0],
 [12.9274413, 77.5155224, 2.0],
 [13.0329419, 77.5273253, 1.0],
 [12.9546741, 77.5121724, 1.0]]
In [231]:
HeatMap(Restaurant_locations[['lat','lon','count']].values.tolist(),zoom=20,radius=15).add_to(basemap)
Out[231]:
<folium.plugins.heat_map.HeatMap at 0x298f19321c8>
In [232]:
basemap
Out[232]:
Make this Notebook Trusted to load map: File -> Trust Notebook

Most of the restaurants are in Central Bangalore area as compared to other areas. Potenital Entrepreneurs can refer an find a suitable location for new restaurants.

In [ ]:
 

Heatmap of north indian restaurants

In [233]:
df2= df[df['cuisines']=='North Indian']
df2.head()
Out[233]:
url address name online_order book_table rate votes phone location rest_type dish_liked cuisines approx_cost(for two people) reviews_list menu_item listed_in(type) listed_in(city)
5 https://www.zomato.com/bangalore/timepass-dinn... 37, 5-1, 4th Floor, Bosco Court, Gandhi Bazaar... Timepass Dinner Yes No 3.8 286 +91 9980040002\r\n+91 9980063005 Basavanagudi Casual Dining Onion Rings, Pasta, Kadhai Paneer, Salads, Sal... North Indian 600 [('Rated 3.0', 'RATED\n Food 3/5\nAmbience 3/... [] Buffet Banashankari
50 https://www.zomato.com/bangalore/petoo-banasha... 276, Ground Floor, 100 Feet Outer Ring Road, B... Petoo No No 3.7 21 +91 8026893211 Banashankari Quick Bites NaN North Indian 450 [('Rated 2.0', 'RATED\n This is a neatly made... [] Delivery Banashankari
72 https://www.zomato.com/bangalore/spicy-tandoor... Opposite ICICi Bank, Hanuman Nagar, Banashanka... Spicy Tandoor No No 0.0 0 +91 8050884222 Banashankari Quick Bites NaN North Indian 150 [('Rated 4.0', 'RATED\n cost for chicken roll... [] Delivery Banashankari
87 https://www.zomato.com/bangalore/krishna-sagar... 38, 22nd Main, 22nd Cross, Opposite BDA, 2nd S... Krishna Sagar No No 3.5 31 +91 8892752997\r\n+91 7204780429 Banashankari Quick Bites NaN North Indian 200 [('Rated 1.0', 'RATED\n Worst experience with... [] Delivery Banashankari
94 https://www.zomato.com/bangalore/nandhini-delu... 304, Opposite Apollo Public School, 100 Feet R... Nandhini Deluxe No No 2.6 283 080 26890011\r\n080 26890033 Banashankari Casual Dining Biryani, Chicken Guntur, Thali, Buttermilk, Ma... North Indian 600 [('Rated 3.0', 'RATED\n Ididnt like much.\n\n... [] Delivery Banashankari
In [234]:
north_india=df2.groupby(['location'],as_index=False)['url'].agg('count')
north_india.columns=['Name','count']
north_india.head()
Out[234]:
Name count
0 BTM 262
1 Banashankari 35
2 Banaswadi 9
3 Bannerghatta Road 60
4 Basavanagudi 17
In [235]:
north_india=north_india.merge(locations,on="Name",how='left').dropna()
In [236]:
north_india['lan'],north_india['lon']=zip(*north_india['geo_loc'].values)
In [237]:
north_india.drop(['geo_loc'],axis=1)
Out[237]:
Name count new_Name lan lon
0 BTM 262 Bangalore BTM 45.954851 -112.496595
1 Banashankari 35 Bangalore Banashankari 15.887678 75.704678
2 Banaswadi 9 Bangalore Banaswadi 13.014162 77.651854
3 Bannerghatta Road 60 Bangalore Bannerghatta Road 12.905971 77.601737
4 Basavanagudi 17 Bangalore Basavanagudi 12.941726 77.575502
... ... ... ... ... ...
58 Varthur Main Road, Whitefield 3 Bangalore Varthur Main Road, Whitefield 12.941466 77.747094
59 Vasanth Nagar 12 Bangalore Vasanth Nagar 12.988721 77.585169
60 Whitefield 146 Bangalore Whitefield 44.373058 -71.611858
61 Wilson Garden 37 Bangalore Wilson Garden 12.948934 77.596827
62 Yeshwantpur 3 Bangalore Yeshwantpur 13.023830 77.552921

63 rows × 5 columns

In [238]:
basemap=generateBaseMap()
HeatMap(north_india[['lan','lon','count']].values.tolist(),zoom=20,radius=15).add_to(basemap)
basemap
Out[238]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [ ]:
 

Analying reviews of particular restaurants

In [239]:
df.head()
Out[239]:
url address name online_order book_table rate votes phone location rest_type dish_liked cuisines approx_cost(for two people) reviews_list menu_item listed_in(type) listed_in(city)
0 https://www.zomato.com/bangalore/jalsa-banasha... 942, 21st Main Road, 2nd Stage, Banashankari, ... Jalsa Yes Yes 4.1 775 080 42297555\r\n+91 9743772233 Banashankari Casual Dining Pasta, Lunch Buffet, Masala Papad, Paneer Laja... North Indian, Mughlai, Chinese 800 [('Rated 4.0', 'RATED\n A beautiful place to ... [] Buffet Banashankari
1 https://www.zomato.com/bangalore/spice-elephan... 2nd Floor, 80 Feet Road, Near Big Bazaar, 6th ... Spice Elephant Yes No 4.1 787 080 41714161 Banashankari Casual Dining Momos, Lunch Buffet, Chocolate Nirvana, Thai G... Chinese, North Indian, Thai 800 [('Rated 4.0', 'RATED\n Had been here for din... [] Buffet Banashankari
2 https://www.zomato.com/SanchurroBangalore?cont... 1112, Next to KIMS Medical College, 17th Cross... San Churro Cafe Yes No 3.8 918 +91 9663487993 Banashankari Cafe, Casual Dining Churros, Cannelloni, Minestrone Soup, Hot Choc... Cafe, Mexican, Italian 800 [('Rated 3.0', "RATED\n Ambience is not that ... [] Buffet Banashankari
3 https://www.zomato.com/bangalore/addhuri-udupi... 1st Floor, Annakuteera, 3rd Stage, Banashankar... Addhuri Udupi Bhojana No No 3.7 88 +91 9620009302 Banashankari Quick Bites Masala Dosa South Indian, North Indian 300 [('Rated 4.0', "RATED\n Great food and proper... [] Buffet Banashankari
4 https://www.zomato.com/bangalore/grand-village... 10, 3rd Floor, Lakshmi Associates, Gandhi Baza... Grand Village No No 3.8 166 +91 8026612447\r\n+91 9901210005 Basavanagudi Casual Dining Panipuri, Gol Gappe North Indian, Rajasthani 600 [('Rated 4.0', 'RATED\n Very good restaurant ... [] Buffet Banashankari
In [240]:
df['reviews_list'][0]
Out[240]:
'[(\'Rated 4.0\', \'RATED\\n  A beautiful place to dine in.The interiors take you back to the Mughal era. The lightings are just perfect.We went there on the occasion of Christmas and so they had only limited items available. But the taste and service was not compromised at all.The only complaint is that the breads could have been better.Would surely like to come here again.\'), (\'Rated 4.0\', \'RATED\\n  I was here for dinner with my family on a weekday. The restaurant was completely empty. Ambience is good with some good old hindi music. Seating arrangement are good too. We ordered masala papad, panner and baby corn starters, lemon and corrionder soup, butter roti, olive and chilli paratha. Food was fresh and good, service is good too. Good for family hangout.\\nCheers\'), (\'Rated 2.0\', \'RATED\\n  Its a restaurant near to Banashankari BDA. Me along with few of my office friends visited to have buffet but unfortunately they only provide veg buffet. On inquiring they said this place is mostly visited by vegetarians. Anyways we ordered ala carte items which took ages to come. Food was ok ok. Definitely not visiting anymore.\'), (\'Rated 4.0\', \'RATED\\n  We went here on a weekend and one of us had the buffet while two of us took Ala Carte. Firstly the ambience and service of this place is great! The buffet had a lot of items and the good was good. We had a Pumpkin Halwa intm the dessert which was amazing. Must try! The kulchas are great here. Cheers!\'), (\'Rated 5.0\', \'RATED\\n  The best thing about the place is itÃ\x83\\x83Ã\x82\\x83Ã\x83\\x82Ã\x82\\x82Ã\x83\\x83Ã\x82\\x82Ã\x83\\x82Ã\x82\\x92s ambiance. Second best thing was yummy ? food. We try buffet and buffet food was not disappointed us.\\nTest ?. ?? ?? ?? ?? ??\\nQuality ?. ??????????.\\nService: Staff was very professional and friendly.\\n\\nOverall experience was excellent.\\n\\nsubirmajumder85.wixsite.com\'), (\'Rated 5.0\', \'RATED\\n  Great food and pleasant ambience. Expensive but Coll place to chill and relax......\\n\\nService is really very very good and friendly staff...\\n\\nFood : 5/5\\nService : 5/5\\nAmbience :5/5\\nOverall :5/5\'), (\'Rated 4.0\', \'RATED\\n  Good ambience with tasty food.\\nCheese chilli paratha with Bhutta palak methi curry is a good combo.\\nLemon Chicken in the starters is a must try item.\\nEgg fried rice was also quite tasty.\\nIn the mocktails, recommend "Alice in Junoon". Do not miss it.\'), (\'Rated 4.0\', \'RATED\\n  You canÃ\x83\\x83Ã\x82\\x83Ã\x83\\x82Ã\x82\\x82Ã\x83\\x83Ã\x82\\x82Ã\x83\\x82Ã\x82\\x92t go wrong with Jalsa. Never been a fan of their buffet and thus always order alacarteÃ\x83\\x83Ã\x82\\x83Ã\x83\\x82Ã\x82\\x82Ã\x83\\x83Ã\x82\\x82Ã\x83\\x82Ã\x82\\x92. Service at times can be on the slower side but food is worth the wait.\'), (\'Rated 5.0\', \'RATED\\n  Overdelighted by the service and food provided at this place. A royal and ethnic atmosphere builds a strong essence of being in India and also the quality and taste of food is truly authentic. I would totally recommend to visit this place once.\'), (\'Rated 4.0\', \'RATED\\n  The place is nice and comfortable. Food wise all jalea outlets maintain a good standard. The soya chaap was a standout dish. Clearly one of trademark dish as per me and a must try.\\n\\nThe only concern is the parking. It very congested and limited to just 5cars. The basement parking is very steep and makes it cumbersome\'), (\'Rated 4.0\', \'RATED\\n  The place is nice and comfortable. Food wise all jalea outlets maintain a good standard. The soya chaap was a standout dish. Clearly one of trademark dish as per me and a must try.\\n\\nThe only concern is the parking. It very congested and limited to just 5cars. The basement parking is very steep and makes it cumbersome\'), (\'Rated 4.0\', \'RATED\\n  The place is nice and comfortable. Food wise all jalea outlets maintain a good standard. The soya chaap was a standout dish. Clearly one of trademark dish as per me and a must try.\\n\\nThe only concern is the parking. It very congested and limited to just 5cars. The basement parking is very steep and makes it cumbersome\')]'
In [241]:
data=df['reviews_list'][0].lower()
data
Out[241]:
'[(\'rated 4.0\', \'rated\\n  a beautiful place to dine in.the interiors take you back to the mughal era. the lightings are just perfect.we went there on the occasion of christmas and so they had only limited items available. but the taste and service was not compromised at all.the only complaint is that the breads could have been better.would surely like to come here again.\'), (\'rated 4.0\', \'rated\\n  i was here for dinner with my family on a weekday. the restaurant was completely empty. ambience is good with some good old hindi music. seating arrangement are good too. we ordered masala papad, panner and baby corn starters, lemon and corrionder soup, butter roti, olive and chilli paratha. food was fresh and good, service is good too. good for family hangout.\\ncheers\'), (\'rated 2.0\', \'rated\\n  its a restaurant near to banashankari bda. me along with few of my office friends visited to have buffet but unfortunately they only provide veg buffet. on inquiring they said this place is mostly visited by vegetarians. anyways we ordered ala carte items which took ages to come. food was ok ok. definitely not visiting anymore.\'), (\'rated 4.0\', \'rated\\n  we went here on a weekend and one of us had the buffet while two of us took ala carte. firstly the ambience and service of this place is great! the buffet had a lot of items and the good was good. we had a pumpkin halwa intm the dessert which was amazing. must try! the kulchas are great here. cheers!\'), (\'rated 5.0\', \'rated\\n  the best thing about the place is itã\x83\\x83ã\x82\\x83ã\x83\\x82ã\x82\\x82ã\x83\\x83ã\x82\\x82ã\x83\\x82ã\x82\\x92s ambiance. second best thing was yummy ? food. we try buffet and buffet food was not disappointed us.\\ntest ?. ?? ?? ?? ?? ??\\nquality ?. ??????????.\\nservice: staff was very professional and friendly.\\n\\noverall experience was excellent.\\n\\nsubirmajumder85.wixsite.com\'), (\'rated 5.0\', \'rated\\n  great food and pleasant ambience. expensive but coll place to chill and relax......\\n\\nservice is really very very good and friendly staff...\\n\\nfood : 5/5\\nservice : 5/5\\nambience :5/5\\noverall :5/5\'), (\'rated 4.0\', \'rated\\n  good ambience with tasty food.\\ncheese chilli paratha with bhutta palak methi curry is a good combo.\\nlemon chicken in the starters is a must try item.\\negg fried rice was also quite tasty.\\nin the mocktails, recommend "alice in junoon". do not miss it.\'), (\'rated 4.0\', \'rated\\n  you canã\x83\\x83ã\x82\\x83ã\x83\\x82ã\x82\\x82ã\x83\\x83ã\x82\\x82ã\x83\\x82ã\x82\\x92t go wrong with jalsa. never been a fan of their buffet and thus always order alacarteã\x83\\x83ã\x82\\x83ã\x83\\x82ã\x82\\x82ã\x83\\x83ã\x82\\x82ã\x83\\x82ã\x82\\x92. service at times can be on the slower side but food is worth the wait.\'), (\'rated 5.0\', \'rated\\n  overdelighted by the service and food provided at this place. a royal and ethnic atmosphere builds a strong essence of being in india and also the quality and taste of food is truly authentic. i would totally recommend to visit this place once.\'), (\'rated 4.0\', \'rated\\n  the place is nice and comfortable. food wise all jalea outlets maintain a good standard. the soya chaap was a standout dish. clearly one of trademark dish as per me and a must try.\\n\\nthe only concern is the parking. it very congested and limited to just 5cars. the basement parking is very steep and makes it cumbersome\'), (\'rated 4.0\', \'rated\\n  the place is nice and comfortable. food wise all jalea outlets maintain a good standard. the soya chaap was a standout dish. clearly one of trademark dish as per me and a must try.\\n\\nthe only concern is the parking. it very congested and limited to just 5cars. the basement parking is very steep and makes it cumbersome\'), (\'rated 4.0\', \'rated\\n  the place is nice and comfortable. food wise all jalea outlets maintain a good standard. the soya chaap was a standout dish. clearly one of trademark dish as per me and a must try.\\n\\nthe only concern is the parking. it very congested and limited to just 5cars. the basement parking is very steep and makes it cumbersome\')]'
In [242]:
import re
data2=re.sub('[^a-zA-Z]', ' ',data)
data2
Out[242]:
'   rated        rated n  a beautiful place to dine in the interiors take you back to the mughal era  the lightings are just perfect we went there on the occasion of christmas and so they had only limited items available  but the taste and service was not compromised at all the only complaint is that the breads could have been better would surely like to come here again       rated        rated n  i was here for dinner with my family on a weekday  the restaurant was completely empty  ambience is good with some good old hindi music  seating arrangement are good too  we ordered masala papad  panner and baby corn starters  lemon and corrionder soup  butter roti  olive and chilli paratha  food was fresh and good  service is good too  good for family hangout  ncheers      rated        rated n  its a restaurant near to banashankari bda  me along with few of my office friends visited to have buffet but unfortunately they only provide veg buffet  on inquiring they said this place is mostly visited by vegetarians  anyways we ordered ala carte items which took ages to come  food was ok ok  definitely not visiting anymore       rated        rated n  we went here on a weekend and one of us had the buffet while two of us took ala carte  firstly the ambience and service of this place is great  the buffet had a lot of items and the good was good  we had a pumpkin halwa intm the dessert which was amazing  must try  the kulchas are great here  cheers       rated        rated n  the best thing about the place is it   x     x     x     x     x     x     x     x  s ambiance  second best thing was yummy   food  we try buffet and buffet food was not disappointed us  ntest                   nquality                nservice  staff was very professional and friendly  n noverall experience was excellent  n nsubirmajumder   wixsite com      rated        rated n  great food and pleasant ambience  expensive but coll place to chill and relax       n nservice is really very very good and friendly staff    n nfood       nservice       nambience      noverall           rated        rated n  good ambience with tasty food  ncheese chilli paratha with bhutta palak methi curry is a good combo  nlemon chicken in the starters is a must try item  negg fried rice was also quite tasty  nin the mocktails  recommend  alice in junoon   do not miss it       rated        rated n  you can   x     x     x     x     x     x     x     x  t go wrong with jalsa  never been a fan of their buffet and thus always order alacarte   x     x     x     x     x     x     x     x    service at times can be on the slower side but food is worth the wait       rated        rated n  overdelighted by the service and food provided at this place  a royal and ethnic atmosphere builds a strong essence of being in india and also the quality and taste of food is truly authentic  i would totally recommend to visit this place once       rated        rated n  the place is nice and comfortable  food wise all jalea outlets maintain a good standard  the soya chaap was a standout dish  clearly one of trademark dish as per me and a must try  n nthe only concern is the parking  it very congested and limited to just  cars  the basement parking is very steep and makes it cumbersome      rated        rated n  the place is nice and comfortable  food wise all jalea outlets maintain a good standard  the soya chaap was a standout dish  clearly one of trademark dish as per me and a must try  n nthe only concern is the parking  it very congested and limited to just  cars  the basement parking is very steep and makes it cumbersome      rated        rated n  the place is nice and comfortable  food wise all jalea outlets maintain a good standard  the soya chaap was a standout dish  clearly one of trademark dish as per me and a must try  n nthe only concern is the parking  it very congested and limited to just  cars  the basement parking is very steep and makes it cumbersome   '
In [243]:
data3=re.sub('rated', ' ',data2)
data3
Out[243]:
'              n  a beautiful place to dine in the interiors take you back to the mughal era  the lightings are just perfect we went there on the occasion of christmas and so they had only limited items available  but the taste and service was not compromised at all the only complaint is that the breads could have been better would surely like to come here again                  n  i was here for dinner with my family on a weekday  the restaurant was completely empty  ambience is good with some good old hindi music  seating arrangement are good too  we ordered masala papad  panner and baby corn starters  lemon and corrionder soup  butter roti  olive and chilli paratha  food was fresh and good  service is good too  good for family hangout  ncheers                 n  its a restaurant near to banashankari bda  me along with few of my office friends visited to have buffet but unfortunately they only provide veg buffet  on inquiring they said this place is mostly visited by vegetarians  anyways we ordered ala carte items which took ages to come  food was ok ok  definitely not visiting anymore                  n  we went here on a weekend and one of us had the buffet while two of us took ala carte  firstly the ambience and service of this place is great  the buffet had a lot of items and the good was good  we had a pumpkin halwa intm the dessert which was amazing  must try  the kulchas are great here  cheers                  n  the best thing about the place is it   x     x     x     x     x     x     x     x  s ambiance  second best thing was yummy   food  we try buffet and buffet food was not disappointed us  ntest                   nquality                nservice  staff was very professional and friendly  n noverall experience was excellent  n nsubirmajumder   wixsite com                 n  great food and pleasant ambience  expensive but coll place to chill and relax       n nservice is really very very good and friendly staff    n nfood       nservice       nambience      noverall                      n  good ambience with tasty food  ncheese chilli paratha with bhutta palak methi curry is a good combo  nlemon chicken in the starters is a must try item  negg fried rice was also quite tasty  nin the mocktails  recommend  alice in junoon   do not miss it                  n  you can   x     x     x     x     x     x     x     x  t go wrong with jalsa  never been a fan of their buffet and thus always order alacarte   x     x     x     x     x     x     x     x    service at times can be on the slower side but food is worth the wait                  n  overdelighted by the service and food provided at this place  a royal and ethnic atmosphere builds a strong essence of being in india and also the quality and taste of food is truly authentic  i would totally recommend to visit this place once                  n  the place is nice and comfortable  food wise all jalea outlets maintain a good standard  the soya chaap was a standout dish  clearly one of trademark dish as per me and a must try  n nthe only concern is the parking  it very congested and limited to just  cars  the basement parking is very steep and makes it cumbersome                 n  the place is nice and comfortable  food wise all jalea outlets maintain a good standard  the soya chaap was a standout dish  clearly one of trademark dish as per me and a must try  n nthe only concern is the parking  it very congested and limited to just  cars  the basement parking is very steep and makes it cumbersome                 n  the place is nice and comfortable  food wise all jalea outlets maintain a good standard  the soya chaap was a standout dish  clearly one of trademark dish as per me and a must try  n nthe only concern is the parking  it very congested and limited to just  cars  the basement parking is very steep and makes it cumbersome   '
In [244]:
data4=re.sub('x',' ',data3)
data4
Out[244]:
'              n  a beautiful place to dine in the interiors take you back to the mughal era  the lightings are just perfect we went there on the occasion of christmas and so they had only limited items available  but the taste and service was not compromised at all the only complaint is that the breads could have been better would surely like to come here again                  n  i was here for dinner with my family on a weekday  the restaurant was completely empty  ambience is good with some good old hindi music  seating arrangement are good too  we ordered masala papad  panner and baby corn starters  lemon and corrionder soup  butter roti  olive and chilli paratha  food was fresh and good  service is good too  good for family hangout  ncheers                 n  its a restaurant near to banashankari bda  me along with few of my office friends visited to have buffet but unfortunately they only provide veg buffet  on inquiring they said this place is mostly visited by vegetarians  anyways we ordered ala carte items which took ages to come  food was ok ok  definitely not visiting anymore                  n  we went here on a weekend and one of us had the buffet while two of us took ala carte  firstly the ambience and service of this place is great  the buffet had a lot of items and the good was good  we had a pumpkin halwa intm the dessert which was amazing  must try  the kulchas are great here  cheers                  n  the best thing about the place is it                                                s ambiance  second best thing was yummy   food  we try buffet and buffet food was not disappointed us  ntest                   nquality                nservice  staff was very professional and friendly  n noverall e perience was e cellent  n nsubirmajumder   wi site com                 n  great food and pleasant ambience  e pensive but coll place to chill and rela        n nservice is really very very good and friendly staff    n nfood       nservice       nambience      noverall                      n  good ambience with tasty food  ncheese chilli paratha with bhutta palak methi curry is a good combo  nlemon chicken in the starters is a must try item  negg fried rice was also quite tasty  nin the mocktails  recommend  alice in junoon   do not miss it                  n  you can                                                t go wrong with jalsa  never been a fan of their buffet and thus always order alacarte                                                  service at times can be on the slower side but food is worth the wait                  n  overdelighted by the service and food provided at this place  a royal and ethnic atmosphere builds a strong essence of being in india and also the quality and taste of food is truly authentic  i would totally recommend to visit this place once                  n  the place is nice and comfortable  food wise all jalea outlets maintain a good standard  the soya chaap was a standout dish  clearly one of trademark dish as per me and a must try  n nthe only concern is the parking  it very congested and limited to just  cars  the basement parking is very steep and makes it cumbersome                 n  the place is nice and comfortable  food wise all jalea outlets maintain a good standard  the soya chaap was a standout dish  clearly one of trademark dish as per me and a must try  n nthe only concern is the parking  it very congested and limited to just  cars  the basement parking is very steep and makes it cumbersome                 n  the place is nice and comfortable  food wise all jalea outlets maintain a good standard  the soya chaap was a standout dish  clearly one of trademark dish as per me and a must try  n nthe only concern is the parking  it very congested and limited to just  cars  the basement parking is very steep and makes it cumbersome   '
In [245]:
re.sub(' +',' ',data4)
Out[245]:
' n a beautiful place to dine in the interiors take you back to the mughal era the lightings are just perfect we went there on the occasion of christmas and so they had only limited items available but the taste and service was not compromised at all the only complaint is that the breads could have been better would surely like to come here again n i was here for dinner with my family on a weekday the restaurant was completely empty ambience is good with some good old hindi music seating arrangement are good too we ordered masala papad panner and baby corn starters lemon and corrionder soup butter roti olive and chilli paratha food was fresh and good service is good too good for family hangout ncheers n its a restaurant near to banashankari bda me along with few of my office friends visited to have buffet but unfortunately they only provide veg buffet on inquiring they said this place is mostly visited by vegetarians anyways we ordered ala carte items which took ages to come food was ok ok definitely not visiting anymore n we went here on a weekend and one of us had the buffet while two of us took ala carte firstly the ambience and service of this place is great the buffet had a lot of items and the good was good we had a pumpkin halwa intm the dessert which was amazing must try the kulchas are great here cheers n the best thing about the place is it s ambiance second best thing was yummy food we try buffet and buffet food was not disappointed us ntest nquality nservice staff was very professional and friendly n noverall e perience was e cellent n nsubirmajumder wi site com n great food and pleasant ambience e pensive but coll place to chill and rela n nservice is really very very good and friendly staff n nfood nservice nambience noverall n good ambience with tasty food ncheese chilli paratha with bhutta palak methi curry is a good combo nlemon chicken in the starters is a must try item negg fried rice was also quite tasty nin the mocktails recommend alice in junoon do not miss it n you can t go wrong with jalsa never been a fan of their buffet and thus always order alacarte service at times can be on the slower side but food is worth the wait n overdelighted by the service and food provided at this place a royal and ethnic atmosphere builds a strong essence of being in india and also the quality and taste of food is truly authentic i would totally recommend to visit this place once n the place is nice and comfortable food wise all jalea outlets maintain a good standard the soya chaap was a standout dish clearly one of trademark dish as per me and a must try n nthe only concern is the parking it very congested and limited to just cars the basement parking is very steep and makes it cumbersome n the place is nice and comfortable food wise all jalea outlets maintain a good standard the soya chaap was a standout dish clearly one of trademark dish as per me and a must try n nthe only concern is the parking it very congested and limited to just cars the basement parking is very steep and makes it cumbersome n the place is nice and comfortable food wise all jalea outlets maintain a good standard the soya chaap was a standout dish clearly one of trademark dish as per me and a must try n nthe only concern is the parking it very congested and limited to just cars the basement parking is very steep and makes it cumbersome '
In [246]:
dataset=df[df['rest_type']=='Quick Bites']
In [247]:
type(dataset['reviews_list'][3])
Out[247]:
str
In [248]:
total_review=' '
for review in dataset['reviews_list']:
    review=review.lower()
    review=re.sub('[^a-zA-Z]', ' ',review)
    review=re.sub('rated', ' ',review)
    review=re.sub('x',' ',review)
    review=re.sub(' +',' ',review)
    total_review=total_review + str(review)
In [251]:
from wordcloud import WordCloud, STOPWORDS 
stopwords=set(STOPWORDS)
wordcloud = WordCloud(width = 800, height = 800, 
                background_color ='white', 
                stopwords = stopwords, 
                min_font_size = 10).generate(total_review) 
# plot the WordCloud image                        
plt.figure(figsize = (8, 8)) 
plt.imshow(wordcloud) 
plt.axis("off") 
Out[251]:
(-0.5, 799.5, 799.5, -0.5)
In [252]:
def importance(restaurant):
    dataset=df[df['rest_type']==restaurant]
    total_review=' '
    for review in dataset['reviews_list']:
        review=review.lower()
        review=re.sub('[^a-zA-Z]', ' ',review)
        review=re.sub('rated', ' ',review)
        review=re.sub('x',' ',review)
        review=re.sub(' +',' ',review)
        total_review=total_review + str(review)
    wordcloud = WordCloud(width = 800, height = 800, 
            background_color ='white', 
            stopwords = set(STOPWORDS), 
            min_font_size = 10).generate(total_review) 
    # plot the WordCloud image                        
    plt.figure(figsize = (8, 8)) 
    plt.imshow(wordcloud) 
    plt.axis("off") 
In [253]:
importance('Quick Bites')
In [ ]: